﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Jint;

namespace jintTest
{
   class Program
   {
      static void Main(string[] args)
      {
         var engine = new JintEngine();
         engine.DisableSecurity();
         engine.SetParameter("mongo", new Mongo(engine));

         while(true)
         {
            Console.Write(">");
            try
            {
               Console.WriteLine(engine.Run(Console.ReadLine()));
            }
            catch (JintException ex)
            {
               Console.WriteLine("Jint error: " + ex.Message);
            }
         }
      }
   }
}
